package org.opens.sql.genConfig;

import lombok.Builder;
import lombok.Data;
import org.opens.sql.constant.TombstoneColumnType;

/**
 * 逻辑删除配置类
 *
 * @author by zhangyuming
 * @date 2023/3/3
 */
@Data
@Builder
public class TombstoneConfig {

    /**
     * 逻辑删除列名称
     */
    private String tombstoneColumnName;

    /**
     * 逻辑删除列类型
     */
    private TombstoneColumnType tombstoneColumnType;

    /**
     * 已删除的值
     */
    private String deletedValue;

    /**
     * 未删除的值
     */
    private String notDeletedValue;

    /**
     * 生成枚举的名称
     */
    private String enumName;

    public static TombstoneConfig getDefault() {
        return TombstoneConfig.builder().tombstoneColumnName("deleted")
                .tombstoneColumnType(TombstoneColumnType.CHAR)
                .deletedValue("Y")
                .notDeletedValue("N")
                .build();
    }

}
